from tortoise import fields
from tortoise.models import Model


class TimestampMixin:
    id = fields.IntField(pk=True, generated=True, description='API Paramater ID')
    create_ts = fields.DatetimeField(null=True, auto_now_add=True, description="create time")
    update_ts = fields.DatetimeField(null=True, auto_now=True, description="update time")


class OtherMixin:
    create_user = fields.CharField(max_length=32, description="create user")
    update_user = fields.CharField(max_length=32, description="update user")
    is_delete = fields.IntField(description="delete status 0 default 1 del",default=0)

class UidMixin:
    uid = fields.CharField(max_length=32, index=True, description="uid")




class TenantMixin:
    tenant_id = fields.CharField(max_length=32,index=True, description="tenant id")

